class Manager {
    private Command command;

    void setCommand(Command command) {
        this.command = command;
    }

    void action() {
        if (this.command != null)
            this.command.execute();
        else {
            System.out.println("please do setCommand() before action()");
        }
    }
}
